import { AsyncComponentLoader, defineAsyncComponent } from 'vue'
import { AsyncLoading } from '@/components/GoLoading/index'

export const loadAsyncComponents = (loader: AsyncComponentLoader<any>) => {
  defineAsyncComponent({
    loader,
    loadingComponent: AsyncLoading,
    delay: 20
  })
}
